<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey_eps_zynqmp_puf.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilskey__eps__zynqmp__puf_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilskey_eps_zynqmp_puf.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the APIs for registering PUF, eFUSE programming and reading the PUF helper data, CHASH and Auxiliary data. </p>
<p>MODIFICATION HISTORY:</p>
<p>Ver Who Date Changes </p>
<hr/>
<p> 6.1 vns 10/17/16 First release. vns 11/07/16 Fixed shutter value to 0x0100005e, as sysosc selection is fixed for PUF registration. 6.2 vns 02/18/17 Added masking for PUF auxiliary read. 6.6 vns 06/06/18 Added doxygen tags 6.7 arc 01/05/19 Fixed MISRA-C violations. arc 03/15/19 Modified initial default status value as XST_FAILURE mmd 03/17/19 Handled buffer underflow issue and added timeouts during syndrome data reading rama 03/25/19 Added polling routine for PUF ready state 6.8 psl 06/07/19 Added doxygen tags. psl 06/25/19 Fixed Coverity warnings. psl 06/28/19 Added doxygen tags. psl 07/05/19 Added Asserts for validation. psl 07/23/19 Fixed input validation. psl 07/29/19 Fixed MISRA-C violation vns 08/29/19 Initialized Status variables 6.9 kpt 02/16/20 Fixed Coverity warnings kpt 02/27/20 Removed XilSKey_Puf_Debug2 which is used only for debug purpose vns 03/18/20 Fixed Armcc compilation errors kal 03/18/20 Added Temp and Voltage checks before writing Puf Helper data, Puf Chash and Puf Aux. kpt 03/17/20 Replaced direct eFuse reads with cache reads and Error code is returned when user chooses read option as eFuse kal 04/09/20 Added Temp and Voltage checks before unlocking the controller. kal 05/14/20 Added Cache Reload in XilSKey_Write_Puf_EfusePs_SecureBits to reflect programmed bit when read from puf example. 7.0 am 10/04/20 Resolved MISRA C violations 7.2 am 07/13/21 Fixed doxygen warnings 7.4 kal 02/16/23 Increased usleep value to 6ms in Puf regeneration function nf 03/13/23 Fixed shifting of Puf auxiliary data in puf status register 7.6 har 04/02/24 Added description for XILSKEY_PUF_KEK_REGEN_RDY_TIMEOUT macro</p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aabbec411d601b05da88b4044d38e4891"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__eps__zynqmp__puf_8c.html#aabbec411d601b05da88b4044d38e4891">XILSKEY_PUF_STATUS_SYN_WRD_RDY_TIMEOUT</a>&#160;&#160;&#160;(500000U)</td></tr>
<tr class="memdesc:aabbec411d601b05da88b4044d38e4891"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status of PUF word syndrome ready timeout.  <a href="#aabbec411d601b05da88b4044d38e4891">More...</a><br/></td></tr>
<tr class="separator:aabbec411d601b05da88b4044d38e4891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae173a76c6c5c1accfaae2131821b7818"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__eps__zynqmp__puf_8c.html#ae173a76c6c5c1accfaae2131821b7818">XILSKEY_PUF_KEK_REGEN_RDY_TIMEOUT</a>&#160;&#160;&#160;(6000U)</td></tr>
<tr class="memdesc:ae173a76c6c5c1accfaae2131821b7818"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delay added to wait for key_rdy bit to be set during PUF regeneration.  <a href="#ae173a76c6c5c1accfaae2131821b7818">More...</a><br/></td></tr>
<tr class="separator:ae173a76c6c5c1accfaae2131821b7818"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a61995a6593f2767e9a52586c1d69a822"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__eps__zynqmp__puf_8c.html#a61995a6593f2767e9a52586c1d69a822">XilsKey_PufRegistrationState</a> { <a class="el" href="xilskey__eps__zynqmp__puf_8c.html#a61995a6593f2767e9a52586c1d69a822abed240fdfae746394ccad3f8b278ccab">XSK_EFUSEPS_PUF_REGISTRATION_STARTED</a>,
<a class="el" href="xilskey__eps__zynqmp__puf_8c.html#a61995a6593f2767e9a52586c1d69a822aeda9b548d47505ea751e58ad29e01358">XSK_EFUSEPS_PUF_REGISTRATION_COMPLETE</a>
 }</td></tr>
<tr class="separator:a61995a6593f2767e9a52586c1d69a822"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5b392432af864665cf95a540ab576388"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga5b392432af864665cf95a540ab576388">XilSKey_ZynqMp_EfusePs_WritePufHelprData</a> (const XilSKey_Puf *InstancePtr)</td></tr>
<tr class="memdesc:ga5b392432af864665cf95a540ab576388"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function programs the PS eFUSEs with the PUF helper data.  <a href="group__xilskey__zynqmp__efuse.html#ga5b392432af864665cf95a540ab576388">More...</a><br/></td></tr>
<tr class="separator:ga5b392432af864665cf95a540ab576388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga244ec0ae43d34ee6500c06dd91f9d372"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga244ec0ae43d34ee6500c06dd91f9d372">XilSKey_ZynqMp_EfusePs_ReadPufHelprData</a> (u32 *Address)</td></tr>
<tr class="memdesc:ga244ec0ae43d34ee6500c06dd91f9d372"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads the PUF helper data from eFUSE.  <a href="group__xilskey__zynqmp__efuse.html#ga244ec0ae43d34ee6500c06dd91f9d372">More...</a><br/></td></tr>
<tr class="separator:ga244ec0ae43d34ee6500c06dd91f9d372"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf1587f5d17256fdbca55efa1cc0eeac0"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaf1587f5d17256fdbca55efa1cc0eeac0">XilSKey_ZynqMp_EfusePs_WritePufChash</a> (const XilSKey_Puf *InstancePtr)</td></tr>
<tr class="memdesc:gaf1587f5d17256fdbca55efa1cc0eeac0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function programs eFUSE with CHash value.  <a href="group__xilskey__zynqmp__efuse.html#gaf1587f5d17256fdbca55efa1cc0eeac0">More...</a><br/></td></tr>
<tr class="separator:gaf1587f5d17256fdbca55efa1cc0eeac0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea3d5e3e09a52ed2a9a3027c065cca23"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaea3d5e3e09a52ed2a9a3027c065cca23">XilSKey_ZynqMp_EfusePs_ReadPufChash</a> (u32 *Address, u8 ReadOption)</td></tr>
<tr class="memdesc:gaea3d5e3e09a52ed2a9a3027c065cca23"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads eFUSE PUF CHash data from the eFUSE array or cache based on the user read option.  <a href="group__xilskey__zynqmp__efuse.html#gaea3d5e3e09a52ed2a9a3027c065cca23">More...</a><br/></td></tr>
<tr class="separator:gaea3d5e3e09a52ed2a9a3027c065cca23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga67de13526ea1502e25b09f80094f2246"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga67de13526ea1502e25b09f80094f2246">XilSKey_ZynqMp_EfusePs_WritePufAux</a> (const XilSKey_Puf *InstancePtr)</td></tr>
<tr class="memdesc:ga67de13526ea1502e25b09f80094f2246"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function programs eFUSE PUF auxiliary data.  <a href="group__xilskey__zynqmp__efuse.html#ga67de13526ea1502e25b09f80094f2246">More...</a><br/></td></tr>
<tr class="separator:ga67de13526ea1502e25b09f80094f2246"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1be2e29f7eba2e556ac69870cd2e028"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gad1be2e29f7eba2e556ac69870cd2e028">XilSKey_ZynqMp_EfusePs_ReadPufAux</a> (u32 *Address, u8 ReadOption)</td></tr>
<tr class="memdesc:gad1be2e29f7eba2e556ac69870cd2e028"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function reads eFUSE PUF auxiliary data from eFUSE array or cache based on user read option.  <a href="group__xilskey__zynqmp__efuse.html#gad1be2e29f7eba2e556ac69870cd2e028">More...</a><br/></td></tr>
<tr class="separator:gad1be2e29f7eba2e556ac69870cd2e028"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f7dae2403511abb09eb0504751f35f4"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga4f7dae2403511abb09eb0504751f35f4">XilSKey_Puf_Registration</a> (XilSKey_Puf *InstancePtr)</td></tr>
<tr class="memdesc:ga4f7dae2403511abb09eb0504751f35f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs registration of PUF which generates a new KEK and associated CHash, Auxiliary and PUF-syndrome data which are unique for each silicon.  <a href="group__xilskey__zynqmp__efuse.html#ga4f7dae2403511abb09eb0504751f35f4">More...</a><br/></td></tr>
<tr class="separator:ga4f7dae2403511abb09eb0504751f35f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccdc46658f23f994c89596961a8580c7"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#gaccdc46658f23f994c89596961a8580c7">XilSKey_Puf_Regeneration</a> (const XilSKey_Puf *InstancePtr)</td></tr>
<tr class="memdesc:gaccdc46658f23f994c89596961a8580c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function regenerates the PUF data so that the PUF's output can be used as the key source to the AES-GCM hardware cryptographic engine.  <a href="group__xilskey__zynqmp__efuse.html#gaccdc46658f23f994c89596961a8580c7">More...</a><br/></td></tr>
<tr class="separator:gaccdc46658f23f994c89596961a8580c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9491848827417a1fb9e25947487e27bf"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga9491848827417a1fb9e25947487e27bf">XilSKey_Write_Puf_EfusePs_SecureBits</a> (const XilSKey_Puf_Secure *WriteSecureBits)</td></tr>
<tr class="memdesc:ga9491848827417a1fb9e25947487e27bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function programs the eFUSE PUF secure bits.  <a href="group__xilskey__zynqmp__efuse.html#ga9491848827417a1fb9e25947487e27bf">More...</a><br/></td></tr>
<tr class="separator:ga9491848827417a1fb9e25947487e27bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64b5db9c2f22e5e5092d58ac7ad4d7f9"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilskey__zynqmp__efuse.html#ga64b5db9c2f22e5e5092d58ac7ad4d7f9">XilSKey_Read_Puf_EfusePs_SecureBits</a> (XilSKey_Puf_Secure *SecureBitsRead, u8 ReadOption)</td></tr>
<tr class="memdesc:ga64b5db9c2f22e5e5092d58ac7ad4d7f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is used to read the PS eFUSE PUF secure bits from cache or from eFUSE array.  <a href="group__xilskey__zynqmp__efuse.html#ga64b5db9c2f22e5e5092d58ac7ad4d7f9">More...</a><br/></td></tr>
<tr class="separator:ga64b5db9c2f22e5e5092d58ac7ad4d7f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ae173a76c6c5c1accfaae2131821b7818"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XILSKEY_PUF_KEK_REGEN_RDY_TIMEOUT&#160;&#160;&#160;(6000U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delay added to wait for key_rdy bit to be set during PUF regeneration. </p>

<p>Referenced by <a class="el" href="group__xilskey__zynqmp__efuse.html#gaccdc46658f23f994c89596961a8580c7">XilSKey_Puf_Regeneration()</a>.</p>

</div>
</div>
<a class="anchor" id="aabbec411d601b05da88b4044d38e4891"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XILSKEY_PUF_STATUS_SYN_WRD_RDY_TIMEOUT&#160;&#160;&#160;(500000U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Status of PUF word syndrome ready timeout. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a61995a6593f2767e9a52586c1d69a822"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="xilskey__eps__zynqmp__puf_8c.html#a61995a6593f2767e9a52586c1d69a822">XilsKey_PufRegistrationState</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a61995a6593f2767e9a52586c1d69a822abed240fdfae746394ccad3f8b278ccab"></a>XSK_EFUSEPS_PUF_REGISTRATION_STARTED</em>&nbsp;</td><td class="fielddoc">
<p>0x0 - PUF registration started </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a61995a6593f2767e9a52586c1d69a822aeda9b548d47505ea751e58ad29e01358"></a>XSK_EFUSEPS_PUF_REGISTRATION_COMPLETE</em>&nbsp;</td><td class="fielddoc">
<p>0x1 - PUF registration complete </p>
</td></tr>
</table>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
